home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / rcs564.zip / CI.MAN < prev    next >
Text File  |  1992-10-07  |  25KB  |  595 lines

  1.  
  2.  
  3.  
  4. CI(1)                                                       CI(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        ci - check in RCS revisions
  9.  
  10. SSYYNNOOPPSSIISS
  11.        ccii [_o_p_t_i_o_n_s] _f_i_l_e ...
  12.  
  13. DDEESSCCRRIIPPTTIIOONN
  14.        ccii stores new revisions into RCS files.  Each pathname
  15.        matching an RCS suffix is taken to be an RCS file.  All
  16.        others are assumed to be working files containing new
  17.        revisions.  ccii deposits the contents of each working file
  18.        into the corresponding RCS file.  If only a working file
  19.        is given, ccii tries to find the corresponding RCS file in
  20.        an RCS subdirectory and then in the working file's
  21.        directory.  For more details, see FILE NAMING below.
  22.  
  23.        For ccii to work, the caller's login must be on the access
  24.        list, except if the access list is empty or the caller is
  25.        the superuser or the owner of the file.  To append a new
  26.        revision to an existing branch, the tip revision on that
  27.        branch must be locked by the caller.  Otherwise, only a
  28.        new branch can be created.  This restriction is not
  29.        enforced for the owner of the file if non-strict locking
  30.        is used (see rrccss(1)).  A lock held by someone else may be
  31.        broken with the rrccss command.
  32.  
  33.        Unless the --ff option is given, ccii checks whether the
  34.        revision to be deposited differs from the preceding one.
  35.        If not, instead of creating a new revision ccii reverts to
  36.        the preceding one.  To revert, ordinary ccii removes the
  37.        working file and any lock; ccii --ll keeps and ccii --uu removes
  38.        any lock, and then they both generate a new working file
  39.        much as if ccoo --ll or ccoo --uu had been applied to the
  40.        preceding revision.  When reverting, any --nn and --ss options
  41.        apply to the preceding revision.
  42.  
  43.        For each revision deposited, ccii prompts for a log message.
  44.        The log message should summarize the change and must be
  45.        terminated by end-of-file or by a line containing .. by
  46.        itself.  If several files are checked in ccii asks whether
  47.        to reuse the previous log message.  If the standard input
  48.        is not a terminal, ccii suppresses the prompt and uses the
  49.        same log message for all files.  See also --mm.
  50.  
  51.        If the RCS file does not exist, ccii creates it and deposits
  52.        the contents of the working file as the initial revision
  53.        (default number: 11..11).  The access list is initialized to
  54.        empty.  Instead of the log message, ccii requests
  55.        descriptive text (see --tt below).
  56.  
  57.        The number _r_e_v of the deposited revision can be given by
  58.        any of the options --ff, --ii, --II, --jj, --kk, --ll, --MM, --qq, --rr, or
  59.        --uu.  _r_e_v may be symbolic, numeric, or mixed.  If _r_e_v is $$,
  60.        ccii determines the revision number from keyword values in
  61.  
  62.  
  63.  
  64. GNU                         1992/07/28                          1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CI(1)                                                       CI(1)
  71.  
  72.  
  73.        the working file.
  74.  
  75.        If _r_e_v is a revision number, it must be higher than the
  76.        latest one on the branch to which _r_e_v belongs, or must
  77.        start a new branch.
  78.  
  79.        If _r_e_v is a branch rather than a revision number, the new
  80.        revision is appended to that branch.  The level number is
  81.        obtained by incrementing the tip revision number of that
  82.        branch.  If _r_e_v indicates a non-existing branch, that
  83.        branch is created with the initial revision numbered
  84.        _r_e_v..11.
  85.  
  86.        If _r_e_v is omitted, ccii tries to derive the new revision
  87.        number from the caller's last lock.  If the caller has
  88.        locked the tip revision of a branch, the new revision is
  89.        appended to that branch.  The new revision number is
  90.        obtained by incrementing the tip revision number.  If the
  91.        caller locked a non-tip revision, a new branch is started
  92.        at that revision by incrementing the highest branch number
  93.        at that revision.  The default initial branch and level
  94.        numbers are 11.
  95.  
  96.        If _r_e_v is omitted and the caller has no lock, but owns the
  97.        file and locking is not set to _s_t_r_i_c_t, then the revision
  98.        is appended to the default branch (normally the trunk; see
  99.        the --bb option of rrccss(1)).
  100.  
  101.        Exception: On the trunk, revisions can be appended to the
  102.        end, but not inserted.
  103.  
  104. OOPPTTIIOONNSS
  105.        --rr_r_e_v  Check in revision _r_e_v.
  106.  
  107.        --rr     The bare --rr option (without any revision) has an
  108.               unusual meaning in ccii.  With other RCS commands, a
  109.               bare --rr option specifies the most recent revision
  110.               on the default branch, but with ccii, a bare --rr
  111.               option reestablishes the default behavior of
  112.               releasing a lock and removing the working file, and
  113.               is used to override any default --ll or --uu options
  114.               established by shell aliases or scripts.
  115.  
  116.        --ll[_r_e_v]
  117.               works like --rr, except it performs an additional
  118.               ccoo --ll for the deposited revision.  Thus, the
  119.               deposited revision is immediately checked out again
  120.               and locked.  This is useful for saving a revision
  121.               although one wants to continue editing it after the
  122.               checkin.
  123.  
  124.        --uu[_r_e_v]
  125.               works like --ll, except that the deposited revision
  126.               is not locked.  This lets one read the working file
  127.  
  128.  
  129.  
  130. GNU                         1992/07/28                          2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CI(1)                                                       CI(1)
  137.  
  138.  
  139.               immediately after checkin.
  140.  
  141.               The --ll, bare --rr, and --uu options are mutually
  142.               exclusive and silently override each other.  For
  143.               example, ccii --uu --rr is equivalent to ccii --rr because
  144.               bare --rr overrides --uu.
  145.  
  146.        --ff[_r_e_v]
  147.               forces a deposit; the new revision is deposited
  148.               even it is not different from the preceding one.
  149.  
  150.        --kk[_r_e_v]
  151.               searches the working file for keyword values to
  152.               determine its revision number, creation date,
  153.               state, and author (see ccoo(1)), and assigns these
  154.               values to the deposited revision, rather than
  155.               computing them locally.  It also generates a
  156.               default login message noting the login of the
  157.               caller and the actual checkin date.  This option is
  158.               useful for software distribution.  A revision that
  159.               is sent to several sites should be checked in with
  160.               the --kk option at these sites to preserve the
  161.               original number, date, author, and state.  The
  162.               extracted keyword values and the default log
  163.               message may be overridden with the options --dd, --mm,
  164.               --ss, --ww, and any option that carries a revision
  165.               number.
  166.  
  167.        --qq[_r_e_v]
  168.               quiet mode; diagnostic output is not printed.  A
  169.               revision that is not different from the preceding
  170.               one is not deposited, unless --ff is given.
  171.  
  172.        --ii[_r_e_v]
  173.               initial checkin; report an error if the RCS file
  174.               already exists.  This avoids race conditions in
  175.               certain applications.
  176.  
  177.        --jj[_r_e_v]
  178.               just checkin and do not initialize; report an error
  179.               if the RCS file does not already exist.
  180.  
  181.        --II[_r_e_v]
  182.               interactive mode; the user is prompted and
  183.               questioned even if the standard input is not a
  184.               terminal.
  185.  
  186.        --dd[_d_a_t_e]
  187.               uses _d_a_t_e for the checkin date and time.  The _d_a_t_e
  188.               is specified in free format as explained in ccoo(1).
  189.               This is useful for lying about the checkin date,
  190.               and for --kk if no date is available.  If _d_a_t_e is
  191.               empty, the working file's time of last modification
  192.               is used.
  193.  
  194.  
  195.  
  196. GNU                         1992/07/28                          3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. CI(1)                                                       CI(1)
  203.  
  204.  
  205.        --MM[_r_e_v]
  206.               Set the modification time on any new working file
  207.               to be the date of the retrieved revision.  For
  208.               example, ccii --dd --MM --uu _f does not alter _f's
  209.               modification time, even if _f's contents change due
  210.               to keyword substitution.  Use this option with
  211.               care; it can confuse mmaakkee(1).
  212.  
  213.        --mm_m_s_g  uses the string _m_s_g as the log message for all
  214.               revisions checked in.
  215.  
  216.        --nn_n_a_m_e assigns the symbolic name _n_a_m_e to the number of the
  217.               checked-in revision.  ccii prints an error message if
  218.               _n_a_m_e is already assigned to another number.
  219.  
  220.        --NN_n_a_m_e same as --nn, except that it overrides a previous
  221.               assignment of _n_a_m_e.
  222.  
  223.        --ss_s_t_a_t_e
  224.               sets the state of the checked-in revision to the
  225.               identifier _s_t_a_t_e.  The default state is EExxpp.
  226.  
  227.        --tt_f_i_l_e writes descriptive text from the contents of the
  228.               named _f_i_l_e into the RCS file, deleting the existing
  229.               text.  The _f_i_l_e may not begin with --.
  230.  
  231.        --tt--_s_t_r_i_n_g
  232.               Write descriptive text from the _s_t_r_i_n_g into the RCS
  233.               file, deleting the existing text.
  234.  
  235.               The --tt option, in both its forms, has effect only
  236.               during an initial checkin; it is silently ignored
  237.               otherwise.
  238.  
  239.               During the initial checkin, if --tt is not given, ccii
  240.               obtains the text from standard input, terminated by
  241.               end-of-file or by a line containing .. by itself.
  242.               The user is prompted for the text if interaction is
  243.               possible; see --II.
  244.  
  245.               For backward compatibility with older versions of
  246.               RCS, a bare --tt option is ignored.
  247.  
  248.        --TT     Preserve the modification time on the RCS file
  249.               unless a new revision is added.  If you have locked
  250.               a revision, ccii usually updates the RCS file's
  251.               modification time even when reverting to the
  252.               previous revision, because the lock is stored in
  253.               the RCS file and removing the lock requires
  254.               changing the RCS file.  However, ccii --TT preserves
  255.               the RCS file's modification time if no new revision
  256.               is added, even if the RCS file changes because a
  257.               lock is removed or because the --nn or --ss options
  258.               affect the previous revision.  This option can
  259.  
  260.  
  261.  
  262. GNU                         1992/07/28                          4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. CI(1)                                                       CI(1)
  269.  
  270.  
  271.               suppress extensive recompilation caused by a
  272.               mmaakkee(1) dependency of some other copy of the
  273.               working file on the RCS file.  Use this option with
  274.               care; it can suppress recompilation even when it is
  275.               needed, i.e. when the change of lock, symbolic
  276.               name, or state would mean a change to keyword
  277.               strings in the other working file.
  278.  
  279.        --ww_l_o_g_i_n
  280.               uses _l_o_g_i_n for the author field of the deposited
  281.               revision.  Useful for lying about the author, and
  282.               for --kk if no author is available.
  283.  
  284.        --VV     Print s version number.
  285.  
  286.        --VV_n    Emulate RCS version _n.  See ccoo(1) for details.
  287.  
  288.        --xx_s_u_f_f_i_x_e_s
  289.               specifies the suffixes for RCS files.  A nonempty
  290.               suffix matches any pathname ending in the suffix.
  291.               An empty suffix matches any pathname of the form
  292.               RRCCSS//_p_a_t_h or _p_a_t_h_1//RRCCSS//_p_a_t_h_2_.  The --xx option can
  293.               specify a list of suffixes separated by //.  For
  294.               example, --xx,,vv// specifies two suffixes: ,,vv and the
  295.               empty suffix.  If two or more suffixes are
  296.               specified, they are tried in order when looking for
  297.               an RCS file; the first one that works is used for
  298.               that file.  If no RCS file is found but an RCS file
  299.               can be created, the suffixes are tried in order to
  300.               determine the new RCS file's name.  The default for
  301.               _s_u_f_f_i_x_e_s is installation-dependent; normally it is
  302.               ,,vv// for hosts like Unix that permit commas in
  303.               filenames, and is empty (i.e. just the empty
  304.               suffix) for other hosts.
  305.  
  306. FFIILLEE NNAAMMIINNGG
  307.        Pairs of RCS files and working files may be specified in
  308.        three ways (see also the example section).
  309.  
  310.        1) Both the RCS file and the working file are given.  The
  311.        RCS pathname is of the form _p_a_t_h_1//_w_o_r_k_f_i_l_e_X and the
  312.        working pathname is of the form _p_a_t_h_2//_w_o_r_k_f_i_l_e where
  313.        _p_a_t_h_1// and _p_a_t_h_2// are (possibly different or empty) paths,
  314.        _w_o_r_k_f_i_l_e is a filename, and _X is an RCS suffix.  If _X is
  315.        empty, _p_a_t_h_1// must start with RRCCSS// or must contain //RRCCSS//.
  316.  
  317.        2) Only the RCS file is given.  Then the working file is
  318.        created in the current directory and its name is derived
  319.        from the name of the RCS file by removing _p_a_t_h_1// and the
  320.        suffix _X.
  321.  
  322.        3) Only the working file is given.  Then ccii considers each
  323.        RCS suffix _X in turn, looking for an RCS file of the form
  324.        _p_a_t_h_2//RRCCSS//_w_o_r_k_f_i_l_e_X or (if the former is not found and _X
  325.  
  326.  
  327.  
  328. GNU                         1992/07/28                          5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. CI(1)                                                       CI(1)
  335.  
  336.  
  337.        is nonempty) _p_a_t_h_2//_w_o_r_k_f_i_l_e_X_.
  338.  
  339.        If the RCS file is specified without a path in 1) and 2),
  340.        ccii looks for the RCS file first in the directory ..//RRCCSS and
  341.        then in the current directory.
  342.  
  343.        ccii reports an error if an attempt to open an RCS file
  344.        fails for an unusual reason, even if the RCS file's
  345.        pathname is just one of several possibilities.  For
  346.        example, to suppress use of RCS commands in a directory _d,
  347.        create a regular file named _d//RRCCSS so that casual attempts
  348.        to use RCS commands in _d fail because _d//RRCCSS is not a
  349.        directory.
  350.  
  351. EEXXAAMMPPLLEESS
  352.        Suppose ,,vv is an RCS suffix and the current directory
  353.        contains a subdirectory RRCCSS with an RCS file iioo..cc,,vv.  Then
  354.        each of the following commands check in a copy of iioo..cc
  355.        into RRCCSS//iioo..cc,,vv as the latest revision, removing iioo..cc.
  356.  
  357.               ccii  iioo..cc;;    ccii  RRCCSS//iioo..cc,,vv;;   ccii  iioo..cc,,vv;;
  358.               ccii  iioo..cc  RRCCSS//iioo..cc,,vv;;    ccii  iioo..cc  iioo..cc,,vv;;
  359.               ccii  RRCCSS//iioo..cc,,vv  iioo..cc;;    ccii  iioo..cc,,vv  iioo..cc;;
  360.  
  361.        Suppose instead that the empty suffix is an RCS suffix and
  362.        the current directory contains a subdirectory RRCCSS with an
  363.        RCS file iioo..cc.  The each of the following commands checks
  364.        in a new revision.
  365.  
  366.               ccii  iioo..cc;;    ccii  RRCCSS//iioo..cc;;
  367.               ccii  iioo..cc  RRCCSS//iioo..cc;;
  368.               ccii  RRCCSS//iioo..cc  iioo..cc;;
  369.  
  370. FFIILLEE MMOODDEESS
  371.        An RCS file created by ccii inherits the read and execute
  372.        permissions from the working file.  If the RCS file exists
  373.        already, ccii preserves its read and execute permissions.
  374.        ccii always turns off all write permissions of RCS files.
  375.  
  376. FFIILLEESS
  377.        Several temporary files may be created in the directory
  378.        containing the working file, and also in the temporary
  379.        directory (see TTMMPPDDIIRR under EENNVVIIRROONNMMEENNTT).  A semaphore
  380.        file or files are created in the directory containing the
  381.        RCS file.  With a nonempty suffix, the semaphore names
  382.        begin with the first character of the suffix; therefore,
  383.        do not specify an suffix whose first character could be
  384.        that of a working filename.  With an empty suffix, the
  385.        semaphore names end with __ so working filenames should not
  386.        end in __.
  387.  
  388.        ccii never changes an RCS or working file.  Normally, ccii
  389.        unlinks the file and creates a new one; but instead of
  390.        breaking a chain of one or more symbolic links to an RCS
  391.  
  392.  
  393.  
  394. GNU                         1992/07/28                          6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. CI(1)                                                       CI(1)
  401.  
  402.  
  403.        file, it unlinks the destination file instead.  Therefore,
  404.        ccii breaks any hard or symbolic links to any working file
  405.        it changes; and hard links to RCS files are ineffective,
  406.        but symbolic links to RCS files are preserved.
  407.  
  408.        The effective user must be able to search and write the
  409.        directory containing the RCS file.  Normally, the real
  410.        user must be able to read the RCS and working files and to
  411.        search and write the directory containing the working
  412.        file; however, some older hosts cannot easily switch
  413.        between real and effective users, so on these hosts the
  414.        effective user is used for all accesses.  The effective
  415.        user is the same as the real user unless your copies of ccii
  416.        and ccoo have setuid privileges.  As described in the next
  417.        section, these privileges yield extra security if the
  418.        effective user owns all RCS files and directories, and if
  419.        only the effective user can write RCS directories.
  420.  
  421.        Users can control access to RCS files by setting the
  422.        permissions of the directory containing the files; only
  423.        users with write access to the directory can use RCS
  424.        commands to change its RCS files.  For example, in hosts
  425.        that allow a user to belong to several groups, one can
  426.        make a group's RCS directories writable to that group
  427.        only.  This approach suffices for informal projects, but
  428.        it means that any group member can arbitrarily change the
  429.        group's RCS files, and can even remove them entirely.
  430.        Hence more formal projects sometimes distinguish between
  431.        an RCS administrator, who can change the RCS files at
  432.        will, and other project members, who can check in new
  433.        revisions but cannot otherwise change the RCS files.
  434.  
  435. SSEETTUUIIDD UUSSEE
  436.        To prevent anybody but their RCS administrator from
  437.        deleting revisions, a set of users can employ setuid
  438.        privileges as follows.
  439.  
  440.        +o Check that the host supports RCS setuid use.  Consult a
  441.          trustworthy expert if there are any doubts.  It is best
  442.          if the sseetteeuuiidd(()) system call works as described in Posix
  443.          1003.1a Draft 5, because RCS can switch back and forth
  444.          easily between real and effective users, even if the
  445.          real user is rroooott.  If not, the second best is if the
  446.          sseettuuiidd(()) system call supports saved setuid (the
  447.          {_POSIX_SAVED_IDS} behavior of Posix 1003.1-1990); this
  448.          fails only if the real or effective user is rroooott.  If
  449.          RCS detects any failure in setuid, it quits immediately.
  450.  
  451.        +o Choose a user _A to serve as RCS administrator for the
  452.          set of users.  Only _A will be able to invoke the rrccss
  453.          command on the users' RCS files.  _A should not be rroooott
  454.          or any other user with special powers.  Mutually
  455.          suspicious sets of users should use different
  456.          administrators.
  457.  
  458.  
  459.  
  460. GNU                         1992/07/28                          7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. CI(1)                                                       CI(1)
  467.  
  468.  
  469.        +o Choose a pathname _B that will be a directory of files to
  470.          be executed by the users.
  471.  
  472.        +o Have _A set up _B to contain copies of ccii and ccoo that are
  473.          setuid to _A by copying the commands from their standard
  474.          installation directory _D as follows:
  475.  
  476.               mmkkddiirr  _B
  477.               ccpp  _D//cc[[iioo]]  _B
  478.               cchhmmoodd  ggoo--ww,,uu++ss  _B//cc[[iioo]]
  479.  
  480.        +o Have each user prepend _B to their path as follows:
  481.  
  482.               PPAATTHH==_B::$$PPAATTHH;;  eexxppoorrtt  PPAATTHH  # ordinary shell
  483.               sseett  ppaatthh==((_B  $$ppaatthh))  # C shell
  484.  
  485.        +o Have _A create each RCS directory _R with write access
  486.          only to _A as follows:
  487.  
  488.               mmkkddiirr  _R
  489.               cchhmmoodd  ggoo--ww  _R
  490.  
  491.        +o If you want to let only certain users read the RCS
  492.          files, put the users into a group _G, and have _A further
  493.          protect the RCS directory as follows:
  494.  
  495.               cchhggrrpp  _G  _R
  496.               cchhmmoodd  gg--ww,,oo--rrwwxx  _R
  497.  
  498.        +o Have _A copy old RCS files (if any) into _R, to ensure
  499.          that _A owns them.
  500.  
  501.        +o An RCS file's access list limits who can check in and
  502.          lock revisions.  The default access list is empty, which
  503.          grants checkin access to anyone who can read the RCS
  504.          file.  If you want limit checkin access, have _A invoke
  505.          rrccss --aa on the file; see rrccss(1).  In particular,
  506.          rrccss --ee --aa_A limits access to just _A.
  507.  
  508.        +o Have _A initialize any new RCS files with rrccss --ii before
  509.          initial checkin, adding the --aa option if you want to
  510.          limit checkin access.
  511.  
  512.        +o Give setuid privileges only to ccii, ccoo, and rrccsscclleeaann; do
  513.          not give them to rrccss or to any other command.
  514.  
  515.        +o Do not use other setuid commands to invoke RCS commands;
  516.          setuid is trickier than you think!
  517.  
  518. EENNVVIIRROONNMMEENNTT
  519.        RRCCSSIINNIITT
  520.               options prepended to the argument list, separated
  521.               by spaces.  A backslash escapes spaces within an
  522.               option.  The RRCCSSIINNIITT options are prepended to the
  523.  
  524.  
  525.  
  526. GNU                         1992/07/28                          8
  527.  
  528.  
  529.  
  530.  
  531.  
  532. CI(1)                                                       CI(1)
  533.  
  534.  
  535.               argument lists of most RCS commands.  Useful
  536.               RRCCSSIINNIITT options include --qq, --VV, and --xx.
  537.  
  538.        TTMMPPDDIIRR Name of the temporary directory.  If not set, the
  539.               environment variables TTMMPP and TTEEMMPP are inspected
  540.               instead and the first value found is taken; if none
  541.               of them are set, a host-dependent default is used,
  542.               typically //ttmmpp.
  543.  
  544. DDIIAAGGNNOOSSTTIICCSS
  545.        For each revision, ccii prints the RCS file, the working
  546.        file, and the number of both the deposited and the
  547.        preceding revision.  The exit status is zero if and only
  548.        if all operations were successful.
  549.  
  550. IIDDEENNTTIIFFIICCAATTIIOONN
  551.        Author: Walter F. Tichy.
  552.        Revision Number: 5.12; Release Date: 1992/07/28.
  553.        Copyright 1982, 1988, 1989 by Walter F. Tichy.
  554.        Copyright 1990, 1991, 1992 by Paul Eggert.
  555.  
  556. SSEEEE AALLSSOO
  557.        co(1), ident(1), make(1), rcs(1), rcsclean(1), rcsdiff(1),
  558.        rcsintro(1), rcsmerge(1), rlog(1), rcsfile(5)
  559.        Walter F. Tichy, RCS--A System for Version Control,
  560.        _S_o_f_t_w_a_r_e_-_-_P_r_a_c_t_i_c_e _& _E_x_p_e_r_i_e_n_c_e 1155, 7 (July 1985),
  561.        637-654.
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592. GNU                         1992/07/28                          9
  593.  
  594.  
  595.